import { FormRule } from 'tdesign-vue-next';
import { ref } from 'vue';

export const INIT_DATA = { sn: '', dev_name: '' };

export const list = ref([
  { label: '设备序列号', value: '', key: 'sn', type: 'InputView', placeholder: '请输入设备序列号', clearable: true },
  { label: '设备名称', value: '', key: 'dev_name', type: 'InputView', placeholder: '请输入设备名称', clearable: true },
]);

export const FORM_RULES: Record<string, FormRule[]> = {
  sn: [{ required: true, message: '请输入设备序列号', trigger: 'blur' }],
  dev_name: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
};
